﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AdminMainMenu.ascx.cs"
  Inherits="NguyenHoa.Web.Controls.AdminMainMenu" %>
<ul class="menu">
  <asp:Repeater runat="server" ID="rptMenu" OnItemDataBound="rptMenu_ItemDataBound">
    <ItemTemplate>
      <li runat="server" id="liMenuItem"><a runat="server" id="lnkMenuItem" title='<%# Eval("Title") %>'>
        <span><strong>
          <%# Eval("Title")%>
        </strong></span></a></li>
    </ItemTemplate>
  </asp:Repeater>
</ul>

<script type="text/javascript">
  function getRootUrl() {
    var href = window.location.href.toLowerCase();
    var ind = href.indexOf("/pages");
    href = href.substring(0, ind + 6);
    return href;
  }

  function enterKeyword(e) {
    var keynum;
    if (window.event)  // IE
    {
      keynum = e.keyCode;
    }
    else if (e.which)  // Firefox/Opera/ 
    {
      keynum = e.which;
    }
    if (keynum == 13) {
      checkKeyword();
      return false;
    }
  }

  function getCurrentMainElement(id, link) {
    __doPostBack('AdminMainMenuChange', id + '|' + link);
  }
</script>

